package online.longzipeng.mywebdemo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author lzp
 * @Description: groovy script auto generate 
 */
@Data
@TableName("user")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User {

    /**
     *  自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     *  nickName
     */
    private String nickName;

    /**
     *  年龄
     */
    private Integer age;

    /**
     *  1男 2女 0未知
     */
    private Integer sex;

    /**
     *  用户名 保证唯一
     */
    private String userName;

    /**
     *  创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
